<?php

// Users table
    // Table name
    $TABLE_USERS = "users";

    // Table columns
    $TABLE_USERS_USERID         = "userID";
    $TABLE_USERS_USERTYPE       = "userType";
    $TABLE_USERS_USERNAME       = "username";
    $TABLE_USERS_PASSWORD       = "password";
    $TABLE_USERS_LASTCONNECTED  = "lastConnected";
    $TABLE_USERS_ENTRYDATE      = "entrydate";
    $TABLE_USERS_EMAILADDRESS   = "emailAddress";
    
// Usertype table
    // Table name
    $TABLE_USERTYPE = "usertype";
    
    // Table columns
    $TABLE_USERTYPE_USERTYPE           = "usertype";
    $TABLE_USERTYPE_USERDESCRIPTION    = "userDescription";
    
    // Table values (only because the table is small)
    $TABLE_USERTYPE_TYPEADMIN      = 1;
    $TABLE_USERTYPE_TYPEREGISTERED = 2;
    $TABLE_USERTYPE_TYPEBUSINESS   = 3;
    $TABLE_USERTYPE_TYPEFINANCIAL  = 4;
    

// Financial users table
    // Table name
    $TABLE_FINANCIALUSER = "financialuser";
    
    // Table columns
    $TABLE_FINANCIALUSER_USERID            = "financialUserID";
    $TABLE_FINANCIALUSER_NAME              = "name";
    $TABLE_FINANCIALUSER_ADDRESS           = "address";
    $TABLE_FINANCIALUSER_PHONELAND         = "phoneNumberLand";
    $TABLE_FINANCIALUSER_PHONECELL         = "phoneNumberMobile";
    $TABLE_FINANCIALUSER_OCCUPATION        = "occupation";
    $TABLE_FINANCIALUSER_EMPLOYER          = "employer";
    $TABLE_FINANCIALUSER_EMPLOYERADDRESS   = "employerAddress";
    $TABLE_FINANCIALUSER_CREDITCARDNUM     = "creditCardNumber";
    $TABLE_FINANCIALUSER_CREDITCARDCODE    = "creditCardCode";
    $TABLE_FINANCIALUSER_PASSWORDQUESTION  = "passwordQuestion";
    $TABLE_FINANCIALUSER_BLACKMARK         = "blackmark";
    

// Home table
    // Table name
    $TABLE_HOME = "home";

    // Table columns
    $TABLE_HOME_HOMEID         = "homeID";
    $TABLE_HOME_ADDRESS        = "address";
    $TABLE_HOME_STREETNAME     = "streetName";
    $TABLE_HOME_CITY           = "city";
    $TABLE_HOME_COUNTRY        = "country";
    $TABLE_HOME_DISTRICT       = "district";
    $TABLE_HOME_ZONE           = "zone";
    $TABLE_HOME_POSTALCODE     = "postalCode";
    $TABLE_HOME_LOTSIZE        = "lotSize";
    $TABLE_HOME_PROPERTYTYPE   = "propertyType";
    $TABLE_HOME_YEARBUILT      = "yearBuilt";
    $TABLE_HOME_HEATING        = "heating";
    $TABLE_HOME_COOLING        = "cooling";
    $TABLE_HOME_PARKING        = "parking";
    $TABLE_HOME_GARAGE         = "garage";
    $TABLE_HOME_DRIVEWAY       = "driveway";
    $TABLE_HOME_NEIGHBOURHOOD  = "neighbourhood";
    $TABLE_HOME_IMPROVEMENTS   = "recentImprovements";
    $TABLE_HOME_EVALUATION     = "evaluation";
    $TABLE_HOME_TAXES          = "taxes";
    $TABLE_HOME_UTILITYCOST    = "utilityCost";
    $TABLE_HOME_PRICE          = "price";
    $TABLE_HOME_COMMENTS       = "comments";
    $TABLE_HOME_LISTINGDATE    = "listingDate";
    $TABLE_HOME_SOLDTO         = "soldTo";
    
// hasRoom table
    // Table name
    $TABLE_HASROOM = "hasRoom";

    // Table columns
    $TABLE_HASROOM_HOMEID      = "homeID";
    $TABLE_HASROOM_ROOMID      = "roomID";
    $TABLE_HASROOM_QUANTITY    = "quantity";
    
// Room table
    // Table name
    $TABLE_ROOM = "hasRoom";

    // Table columns
    $TABLE_ROOM_ROOMID      = "homeID";
    $TABLE_ROOM_FUNCTION    = "function";
    $TABLE_ROOM_DESCRIPTION = "description";
    $TABLE_ROOM_SIZE        = "size";
    
// hasMedia table
    // Table name
    $TABLE_HASMEDIA = "hasMedia";

    // Table columns
    $TABLE_HASMEDIA_HOMEID  = "homeID";
    $TABLE_HASMEDIA_MEDIAID = "mediaID";
    
// Media table
    // Table name
    $TABLE_HASMEDIA         = "media";

    // Table columns
    $TABLE_MEDIA_MEDIAID    = "mediaID";
    $TABLE_MEDIA_MEDIAPATH  = "mediaPath";
    

// ActivityTypes table
    // Table name
    $TABLE_ACTIVITYTYPES    = "activitytypes";
    
    // Table columns
    $TABLE_ACTIVITYTYPES_ACTIVITYID             = "activityID";
    $TABLE_ACTIVITYTYPES_ACTIVITYDESCRIPTION    = "activityDescription";
    
    // Table values (used only because the table is small)
    $TABLE_ACTIVITYTYPES_LOGGEDIN        = 1;
    $TABLE_ACTIVITYTYPES_LOGGEDOUT       = 2;    

// Logs table
    // Table name
    $TABLE_LOGS     = "logs";
    
    // Table columns
    $TABLE_LOGS_ID              = "id";
    $TABLE_LOGS_USERID          = "userID";
    $TABLE_LOGS_ACTIVITYTYPE    = "activityType";
    $TABLE_LOGS_LOGGEDAT        = "loggedAt";
    $TABLE_LOGS_EXTRACOMMENTS   = "extraComments";
    
// Ads table
    // Table name
    $TABLE_ADS     = "ads";
    
    // Table columns
    $TABLE_ADS_ADID            = "adID";
    $TABLE_ADS_TITLE           = "title";
    $TABLE_ADS_LOCATION        = "location";
    $TABLE_ADS_EXPIRYDATE      = "expiryDate";
    $TABLE_ADS_VIEWS           = "views";
    $TABLE_ADS_MEDIAPATH       = "mediaPath";
    $TABLE_ADS_DESCRIPTION     = "description";
    
// Registered users table
    // Table name
    $TABLE_REGISTEREDUSER = "registereduser";
    
    // Table columns
    $TABLE_REGISTEREDUSER_USERID            = "registeredUserID";
    $TABLE_REGISTEREDUSER_NAME              = "name";
    $TABLE_REGISTEREDUSER_ADDRESS           = "address";
    $TABLE_REGISTEREDUSER_PHONELAND         = "phoneNumberLand";
    $TABLE_REGISTEREDUSER_PHONECELL         = "phoneNumberMobile";
    $TABLE_REGISTEREDUSER_OCCUPATION        = "occupation";
    $TABLE_REGISTEREDUSER_EMPLOYER          = "employer";
    $TABLE_REGISTEREDUSER_EMPLOYERADDRESS   = "employerAddress";
    $TABLE_REGISTEREDUSER_CREDITCARDNUM     = "creditCardNumber";
    $TABLE_REGISTEREDUSER_CREDITCARDCODE    = "creditCardCode";
    $TABLE_REGISTEREDUSER_PASSWORDQUESTION  = "passwordQuestion";
    $TABLE_REGISTEREDUSER_BLACKMARK         = "blackmark";
    
// Business agents table
    // Table name
    $TABLE_BUSINESSAGENT = "businessagents";
    
    // Table columns
    $TABLE_BUSINESSAGENT_USERID                 = "businessUserID";
    $TABLE_BUSINESSAGENT_COMPANYNAME            = "companyName";
    $TABLE_BUSINESSAGENT_BUSINESSCHARTER        = "businessCharter";
    $TABLE_BUSINESSAGENT_CONTACTNAME            = "contactName";
    $TABLE_BUSINESSAGENT_CONTACTPHONELAND       = "contactPhoneLand";
    $TABLE_BUSINESSAGENT_CONTACTPHONEMOBILE     = "contactPhoneMobile";
    $TABLE_BUSINESSAGENT_CONTACTPHONEFAX        = "contactPhoneFax";
    $TABLE_BUSINESSAGENT_CONTACTPOSITION        = "contactPosition";
    $TABLE_BUSINESSAGENT_CONTACTEMAIL           = "contactEmail";
    $TABLE_BUSINESSAGENT_COMPANYADDRESS         = "companyAddress";
    $TABLE_BUSINESSAGENT_COMPANYCITY            = "companyCity";
    $TABLE_BUSINESSAGENT_COMPANYSTATE           = "companyState";
    $TABLE_BUSINESSAGENT_COMPANYPOSTALCODE      = "companyPostalCode";
    $TABLE_BUSINESSAGENT_COMPANYCOUNTRY         = "companyCountry";
    $TABLE_BUSINESSAGENT_COMPANYEMAIL           = "companyEmail";
    $TABLE_BUSINESSAGENT_PREFERREDINDUSTRY      = "preferredIndustry";
    
// List table
    // Table name
    $TABLE_LIST = "list";
    
    // Table columns
    $TABLE_LIST_USERID = "userID";
    $TABLE_LIST_HOMEID = "homeID";
    
    
?>
